<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="shortcut icon" href="#" type="image/png">

    <title>学生列表展示</title>

    <!--dynamic table-->
    <link th:href="@{js/advanced-datatable/css/demo_page.css}" rel="stylesheet"/>
    <link th:href="@{js/advanced-datatable/css/demo_table.css}" rel="stylesheet"/>
    <link rel="stylesheet" th:href="@{js/data-tables/DT_bootstrap.css}"/>

    <!--common-->
    <link th:include="common :: head">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
</head>

<body class="sticky-header">

<section>
    <!-- left side start-->
    <div th:replace="common :: left"></div>
    <!-- left side end-->

    <!-- main content start-->
    <div class="main-content">

        <!-- header section start-->
        <div th:replace="common :: align-top"></div>
        <!-- header section end-->

        <!-- page heading start-->
        <div class="page-heading">
            <h3>
                学生列表展示
            </h3>
            
            <ul class="breadcrumb">
                <li>
                    <a href="#">Dashboard</a>
                </li>
                <li>
                    <a href="#">Data Tables</a>
                </li>
                <li class="active"> 学生列表展示</li>
            </ul>
        </div>
        <!-- page heading end-->

        <!--body wrapper start-->
        <div class="wrapper">
            <div class="row">
                <div class="col-sm-12">
                    <section class="panel">
                        <header class="panel-heading">
                            学生列表展示
                            <span class="tools pull-right">
                <a href="javascript:;" class="fa fa-chevron-down"></a>
                <a href="javascript:;" class="fa fa-times"></a>
             </span>
                        </header>
                        <div class="panel-body">
                            <div class="adv-table">
                                <table class="display table table-bordered table-striped" id="dynamic-table">
                                    <thead>
                                    <tr>
                                        <th>id</th>
                                        <th>name</th>
                                        <th>studentId</th>
                                        <th>gender</th>
                                        <th>society</th>
                                        <th>communityName</th>
                                    </tr>
                                    </thead>
                                    <!--            TODO 学生列表展示-->
<!--                                    <div style="text-align: center;margin-left:10%;margin-bottom:10px;color:#ee1e2d;" th:text="${session.tishi}"></div>-->
                                    <tbody>
                                    <tr class="gradeX" th:each="list,stat:${page1.records}">
                                        <td th:text="${(page1.current - 1)*limit + stat.index + 1}"></td>
                                        <td th:text="${list.name}"></td>
                                        <td th:text="${list.studentId}"></td>
                                        <td th:text="${list.gender}"></td>
                                        <!--            专业-->
                                        <td th:text="${list.society}"></td>
                                        <!--            社团名-->
                                        <td th:text="${list.communityName}"></td>
                                        <td>
                                            <a th:href="@{shetuan/student/delete/{id}(id=${list.id})}" class="btn btn-danger btn-sm" id="button" type="button">删除</a>
                                        </td>
                                    </tr>
                                    </tbody>

                                </table>
                            </div>
                        </div>
                        <!--                            TODO 分页-->
                        <div class="row-fluid">
                            <div class="span6">
                                <div class="dataTables_info" id="dynamic-table_info">当前为第<span style="color: blue">[[${page1.current}]]</span>页
                                    总计<span style="color: blue">[[${page1.pages}]] </span>页
                                    一共<span style="color: blue">[[${page1.total}]]</span> 条记录
                                </div>
                            </div>
                            <div class="span6">
                                <div class="dataTables_paginate paging_bootstrap pagination">
                                    <ul>
                                        <li class="prev disabled"><a href="#">上一页</a></li>
                                        <li th:class="${num == page1.current?'active':''}" th:each="num:${#numbers.sequence(1,page1.pages)}">
                                            <a th:href="@{/dynamic_table(pn=${num})}" >[[${num}]]</a></li>
                                        <li th:class="${page1.current != page1.pages?'#':'disabled'}"><a th:href="@{/dynamic_table(pn=${page1.current+1})}">下一页</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>

                    </section>
                </div>
            </div>
        </div>
        <!--body wrapper end-->

        <!--footer section start-->
        <footer>
            2020 &copy; AdminEx by ThemeBucket </a>
        </footer>
        <!--footer section end-->


    </div>
    <!-- main content end-->
</section>

<!-- Placed js at the end of the document so the pages load faster -->
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="js/jquery-migrate-1.2.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/modernizr.min.js"></script>
<script src="js/jquery.nicescroll.js"></script>

<!--dynamic table-->
<script type="text/javascript" language="javascript" src="js/advanced-datatable/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="js/data-tables/DT_bootstrap.js"></script>
<!--dynamic table initialization -->
<!--<script src="js/dynamic_table_init.js"></script>-->

<!--common scripts for all pages-->
<script src="js/scripts.js"></script>

</body>
<script>

</script>
</html>
